* run the regressions models and save them to memory ---------------------------

eststo: reg treatment recruitment_pool, cluster(province)

eststo: reg treatment recruitment_pool akp_jun kurdish_district akp_district    ///
higher_education min_margin turnout_jun, cluster(province)

eststo: reg treatment_multi recruitment_pool, cluster(province)

eststo: reg treatment_multi recruitment_pool akp_jun kurdish_district           ///
akp_district higher_education min_margin turnout_jun, cluster(province)

* print the results ------------------------------------------------------------

esttab,                                                                         ///
replace se b(3) se(3) stats(N vce r2) label nodepvars nonotes nomtitles         ///
mgroups("Treatment" "Multiple Treatment",                                       ///
pattern(1 0 1 0) span)                                                          ///
substitute(vce "Clusters" cluster "81")                                         ///
title("Table S2: Regression models of treatment allocation")

* save the results -------------------------------------------------------------

esttab using "./tables/table_s2.tex",                                           ///
replace se b(3) se(3) stats(N vce r2) label nodepvars nonotes nomtitles         ///
mgroups("Treatment" "Multiple Treatment",                                       ///
pattern(1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span                 ///
erepeat(\cmidrule(lr){@span}))                                                  ///
substitute(vce "Clusters" cluster "81")                                         ///
title("Regression models of treatment allocation")

* remove the models from memory ------------------------------------------------

eststo clear